package com.zhijian.medical.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 二代测序样本状态枚举类
 *
 * @author HCG
 * @version 1.0
 * @date 2022/8/12
 */
@AllArgsConstructor
@Getter
public enum NgsSampleStatusEnum {

    NEW(0, "新建"),
    WAIT_ZB(1, "待准备"),
    YZB(2, "已准备"),
    WAIT_TQ(3, "待核酸提取"),
    YTQ(4, "已核酸提取"),
    JCZ(5, "检测中"),
    END(6, "检测结束"),
    STOP(98, "停止检测"),
    BHG(99, "不合格");

    private Integer code;
    private String type;

    public static NgsSampleStatusEnum getByCode(Integer code) {
        NgsSampleStatusEnum[] values = NgsSampleStatusEnum.values();
        for (NgsSampleStatusEnum anEnum : values) {
            if (anEnum.getCode().equals(code)) {
                return anEnum;
            }
        }
        return null;
    }
}
